package org.example;

import java.util.Calendar;
import java.util.Date;

/**
 * @program: exper_code
 * @description:
 * @author: 万骏頔
 * @create: 2025-11-5 14:58
 **/
public class Throughbred {
    private Throughbred mother;
    private Throughbred father;
    private Date birthyear;

    public Throughbred getMother() {
        return mother;
    }

    public Throughbred getFather() {
        return father;
    }

    public Long getCurrentDate(){
        Date current = new Date();
        Calendar instance = Calendar.getInstance();
        instance.setTime(current);
        Calendar instance2 = Calendar.getInstance();
        instance2.setTime(birthyear);

        Long timeDifference = instance.getTimeInMillis() - instance2.getTimeInMillis();
        Long years = timeDifference / (1000 * 60 * 60 * 24 * 365);

        return years;
    }
}
